{{extends "base.htm"}}

{{block name=title}}{{$application_name}} - {{$page.name|escape}}{{/block}}

{{block name=stylesheet}}
  <script type="text/javascript" src="/static/javascript/tinymce/tiny_mce.js"></script>
  <style type="text/css">

  #body {
    margin: 29px;
    margin-top: 19px;
  }

  #body .buttons {
    margin-top: 0.75em;
  }

  #body .buttons .item {
    margin-right: 0.5em;
  }

  </style>
{{/block}}

{{block name=body}}
  <form action="/wikitest/{{ page_name }}/save/" method="post">
    <div><textarea rows="10" cols="50" id="content" style="width: 100%; height: 400px" name="content">{{ content|safe }}</textarea></div>
    <div class="buttons">
      <span class="item"><input style="font-weight: bold" type="submit" value="Save Changes"/></span>
      <span class="item"><input type="button" onclick="location.href='/wikitest/{{ page_name }}'" value="Cancel"/></span>
    </div>
  </form>
{{/block}}

{{block name=javascript}}
	<script type="text/javascript">

	tinyMCE.init({
		mode: "textareas",
		theme: "advanced",
		content_css: "/static/css/base.css",
		auto_focus: "mce_editor_0"
	});

	</script>
{{/block}}
